﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MassContentUploader.DataTypes.MassUploader {
    public class DataType : umbraco.cms.businesslogic.datatype.AbstractDataEditor {

        #region "AbstractDataEditor implementation"
        private MassUploaderControl DataTypeControl = new MassUploaderControl();

        //public AbstractDataEditorControl DataEditorControl { get; }
        public override Guid Id { 
            get { 
                return new Guid("9904ca34-cbce-4943-ba4e-c660c5aa9612");
            } 
        }
        public override string DataTypeName {
            get {
                return "MassUploader";
            }
        }
        //public override IDataPrevalue PrevalueEditor { get; }
        #endregion

        #region "Constructor"
        public DataType() {
            base.RenderControl = this.DataTypeControl;

            this.DataTypeControl.Init += new EventHandler(DataTypeControl_OnInit);

            base.DataEditorControl.OnSave += new umbraco.cms.businesslogic.datatype.AbstractDataEditorControl.SaveEventHandler(DataEditorControl_OnSave);    
        }
        #endregion

        #region "Event handlers"
        void DataTypeControl_OnInit(object sender, EventArgs e) {

            //base.Data.Value = this.DataTypeControl.Text;

        }

        void DataEditorControl_OnSave(EventArgs e) {
            //base.Data.Value = this.DataTypeControl.Text;

        }

        #endregion
    }
}